package com.nengchuan.kbms.dfs.entity.dto;

import com.nengchuan.kbms.dfs.annotation.Relation;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.ToString;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;
import javax.validation.constraints.Size;

/**
 * <p>
 * 文件夹 DTO
 * </p>
 *
 * @author abe
 * @since 2020-03-24
 */
@Data
@EqualsAndHashCode(callSuper = false)
@ApiModel(value = "DataFolder对象", description = "文件夹")
@ToString
public class DataFolderDTO {

    @ApiModelProperty(value = "主键", position = 10)
    private Long id;

    @ApiModelProperty(value = "父文件夹id", position = 15)
    @Relation
    @NotNull(message = "父文件夹id不能为空")
    private Long parentId;

    @ApiModelProperty(value = "文件夹名称", position = 20)
    @Relation
    @Size(max = 255,message = "文件夹名称在1~255个字符之间")
    @NotBlank
    private String folderName;

}
